<title>List | Users</title>

<table class="table well">
    <thead>
        <tr>
            <th>#</th>
            <th>Name</th>
            <th>Email</th>
            <th>Operation</th>
        </tr>
    </thead>
    <tbody>
        <?php
        $i = 1;
        foreach ($this->allUsers as $user) {
            if ($user['id'] != $this->currUser) {

                $name = '';
                $email = $user['email'];
                if ($user['name'] != null) {
                    $name = $user['name'];
                }
                ?>
                <tr>
                    <td><?= $i ?></td>
                    <td><?= $name ?></td>
                    <td><?= $email ?></td>
                    <td>
                        <a class="btn btn-mini btn-info" href="<?= $this->url(array('id' => $user['id']), 'user-public-profile'); ?>" ><i class="icon-white icon-file"></i> View Profile</a>
                        <a class="btn btn-mini btn-info" href="<?= $this->url(array('id'=>$user['id']), 'user-public-comment'); ?>"> <i class="icon-white icon-comment"></i> View Comments of this user</a>
                    </td>
                </tr>

                <?
                $i++;
            }
        }
        ?>
    </tbody>
</table>